import router from '@ohos.router';
import prompt from '@system.prompt';

export default {
//    data: {
//        txt:'false',
//        title: "登录"
//    },
    onInit() {
        this.title = this.$t('strings.world');
    },
    imageComplete(i,e){
        prompt.showToast({
            message: "Image "+i+"'s width"+ e.width+"----Image "+i+"'s height"+e.height,
            duration: 3000,
        })
    },
    imageError(i,e){
        this.txt = 'true'
    },
    checkboxOnChange(e) {
        console.info('checkboxOnChange')
    },
    onRadioChange(inputValue, e) {
        console.info('onRadioChange')
    },
    change(e){
        console.info('onRadioChange')
    },
    pushPage() {
        router.push({
            url: 'pages/detail/detail',
            params: {
                data1: 'message',
            },
        });
    },

    goto () {
        router.push({
           url: 'pages/detail/detail'
        })
    },

    goto1 () {
        router.push({
            url: 'pages/Register/Register'
        })
    },

    goto2 () {
        router.push({
            url: 'pages/forgetCrypto/forgetCrypto'
        })
    },

    data: {
        progress: 10,
        downloadText: "进度条按钮"
    },
    setProgress(e) {
        var i=0
        var set= setInterval(()=>{
            i+=10
            this.progress=i
            this.downloadText = this.progress + "%";
            this.$element('download-btn').setProgress({ progress: this.progress });
            if(this.progress>=100){
                clearInterval(set)
                this.downloadText="完成"
            }
        },1000)
    },
}


